// 样式相关
import './assets/main.css'
import "./styles/index.scss"

// 图标相关
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { fas } from '@fortawesome/free-solid-svg-icons';
library.add(fas)

// 组件相关
import Icon from "./components/Icon";
import Button from "./components/Button";
import Card from './components/Card';
import Dialog from './components/Dialog';
import Pager from "./components/Pager";
import { Collapse } from "./components/Collapse";
import { CollapseItem } from './components/Collapse';
import ToolTip from "./components/ToolTip";
import Dropdown from './components/DropDown';
import Input from "./components/Input";

const components = [Icon, Button, Card, Dialog, Pager, Collapse, CollapseItem, ToolTip, Dropdown, Input]

const install = (app) => {
    components.forEach(component => {
        app.component(component.name, component)
    })
    app.component('font-awesome-icon', FontAwesomeIcon)
}

// 1.全部导出
export default {
    install
}

export { install, Icon, Button, Card, Dialog, Pager, Collapse, CollapseItem, ToolTip, Dropdown, Input }